package com.impl;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Dbutils 
{
public static  Connection createConn()
{
	Connection conn=null;
	String uid="root";
	String pwd="123456";
	String url="jdbc:mysql://localhost:3306/softdb";
	String claname="com.mysql.jdbc.Driver";
	try 
	{
	Class.forName(claname);	
	} 
	catch (ClassNotFoundException e) 
	{
		// TODO: handle exception
		e.printStackTrace();
	}
	try 
	{
		conn=DriverManager.getConnection(url,uid,pwd);
	} 
	catch(SQLException e)
	{
		// TODO: handle exception
		e.printStackTrace();
	}
	return conn;
}
}
